<template>
    <div id="footer">
        <van-tabbar route>
            <van-tabbar-item v-for="item in TabbarList" :key="item.id" replace :to="item.to" :icon="item.icon">
                {{ item.title }}</van-tabbar-item>
        </van-tabbar>
    </div>
</template>

<script setup lang="ts">
//定义一个数组，利用循环生成 ， 里面定义路由 图标 文字


//导入接口限制
import type { MyTabbaryItem } from '@/config/interface'
const TabbarList: MyTabbaryItem[] = [
    //定义  tabbar数组TabbarList
    { id: 1, to: '/home', icon: 'home-o', title: '首页' },
    { id: 2, to: '/liebiao', icon: 'apps-o', title: '列表页' },
    { id: 3, to: '/shoppingcart', icon: 'cart-o', title: '购物车' },
    { id: 4, to: '/self', icon: 'user-o', title: '我的' },
]


</script>
<style scoped>

</style>